﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Prototype.master" AutoEventWireup="false" CodeFile="DiscussionDetails.aspx.vb" Inherits="Discussions_ViewDiscussions" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<fieldset>
<legend><label>Discussion Topic</label></legend>
    <asp:DetailsView ID="DVDiscussions" runat="server" Height="50px" Width="380px" 
        AutoGenerateRows="False" DataSourceID="DSDiscussions">
        <Fields>
            <asp:BoundField DataField="Topic" HeaderText="Topic" SortExpression="Topic" />
        </Fields>
    </asp:DetailsView>
    <asp:SqlDataSource ID="DSDiscussions" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        SelectCommand="SELECT [Topic] FROM [tblDiscussions]"></asp:SqlDataSource>
</fieldset>

<fieldset>
<legend>Contributions</legend>
    <asp:GridView ID="DGContribution" runat="server" AutoGenerateColumns="False" 
        DataSourceID="DSContribution">
        <Columns>
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
            <asp:BoundField DataField="Contribution" HeaderText="Contribution" 
                SortExpression="Contribution" />
            <asp:BoundField DataField="SubmittedDate" HeaderText="SubmittedDate" 
                SortExpression="SubmittedDate" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="DSContribution" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        
        SelectCommand="SELECT [Contribution], [Author], [Discuss_fkid], [SubmittedDate] FROM [tblDiscussContrib] WHERE ([Discuss_fkid] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="Discuss_fkid" QueryStringField="ID" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
</fieldset>

<fieldset>
    <legend><label for="Contributions">Contributions</label></legend>
    <form action="" method="post">
    <ul>
         
        <li>
        <label for="Author">Author:</label>
        <asp:TextBox ID="txtAuthor" runat="server"></asp:TextBox>
        </li>

        <li>
        <label for="comments">Your Comments:</label>
        <asp:TextBox ID="txtComments" runat="server" TextMode="MultiLine"></asp:TextBox>
        </li>

        <li>
           <asp:Button ID="btnSubmit" runat="server" Text="Add Comment" />
        </li>
    </ul>
    </form>
    </fieldset>
</asp:Content>

